<?php
/**
 * Created by PhpStorm.
 * User: dong
 * Date: 2018/5/26
 * Time: 20:02
 */
namespace App\Services\ThirdPayments\BankTraits;

use App\Lib\BankMap;

trait HFTBankMap
{
    private $bankMap = [
        BankMap::GONGSHANG       =>  'gsbank',
        BankMap::JIANSHE         =>  'jsbank',
        BankMap::CHINABANK       =>  'cnbank',
        BankMap::ZHAOSHANG       =>  'zsbank',
        BankMap::ZHONGXIN        =>  'zxban',
        BankMap::XINGYE          =>  'xybank',
        BankMap::GUANGDA         =>  'guangdabank',
        BankMap::NONGYE          =>  'nybank',
        BankMap::YOUZHEN         =>  'yzbank',
        BankMap::GUANGFA         =>  'gfbank',
        BankMap::MINSHENG        =>  'msbank',
        BankMap::JIAOTONG        =>  'jtbank',
        BankMap::SHANGHAI        =>  'shban',
        BankMap::NINGBO          =>  'nbbank',
        BankMap::PUFA            =>  'pfbank',
        BankMap::NANJING         =>  'njbank',
        BankMap::PINGAN          =>  'pabank',
    ];

    public function getBank($bankCode)
    {
        if (array_key_exists($bankCode, $this->bankMap)) return $this->bankMap[$bankCode];
        else return 'gsbank';
    }
}